#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"

void Test1()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPushBack(plist, 5);
	LTPushBack(plist, 6);
	LTPushBack(plist, 7);
	LTPrint(plist);
	LTPopBack(plist);
	LTPopBack(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTPushFront(plist, 9);
	LTPushFront(plist, 10);
	LTPrint(plist);

}

void Test2()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPushBack(plist, 5);
	LTPushBack(plist, 6);
	LTPushBack(plist, 7);
	LTPrint(plist);
	LTNode* plistt = LTFind(plist,3);
	LTPopFront(plist);
	LTPopBack(plist);
	LTPrint(plist);
	if (plistt)
	{
		LTErase(plistt);
		plistt = NULL;
	}
	LTPrint(plist);
	LTDestroy(plist);
	plist = NULL;

}

int main()
{
	Test2();
	return 0;
}